package com.allenlee.mvphelper.manager;

import java.util.HashMap;
import java.util.Map;

import com.allenlee.mvphelper.base.BaseFragment;
import com.allenlee.mvphelper.bean.MHItemDescription;

/**
 * @author : lifei
 * 创建时间： 19-11-27
 * 更改时间： 19-11-27
 * Email : allen.lee723@qq.com
 * @version :
 * Description：
 */
public class MHWidgetContainer {

    private static MHWidgetContainer sInstance = new MHWidgetContainer();

    private Map<Class<? extends BaseFragment>, MHItemDescription> mWidgets;

    private MHWidgetContainer() {
        mWidgets = new HashMap<>();
        // 示例
        //mWidgets.put(QDTabSegmentFragment.class, new MHItemDescription(QDTabSegmentFragment.class, "QMUITabSegment", 2131492899, ""));
    }

    public static MHWidgetContainer getInstance() {
        return sInstance;
    }

    public MHItemDescription get(Class<? extends BaseFragment> fragment) {
        return mWidgets.get(fragment);
    }
}
